//
//  Weather.h
//  Charles
//
//  Created by Leo on 2017/6/14.
//  Copyright © 2017年 charles. All rights reserved.
//

#import <Foundation/Foundation.h>

#pragma mark - 观察者协议

@protocol Observer <NSObject>

- (void)updateTemp:(CGFloat)temp humidity:(CGFloat)humidity pressure:(CGFloat)pressure;

@end

#pragma mark - 主题协议

@protocol Subject <NSObject>

- (void)registerObserver:(id<Observer>)observer;
- (void)removeObserver:(id<Observer>)observer;;
- (void)notifyObserver;

@end

#pragma mark -展示协议

@protocol DisplayElement <NSObject>

- (void)display;

@end

#pragma mark - 气象数据

@interface WeatherData : NSObject<Subject>

- (void)setMeasurementsTemp:(CGFloat)temp humidity:(CGFloat)humidity pressure:(CGFloat)pressure;

@end

#pragma mark - 布告板

@interface CurrentConditionsDisplay : NSObject<Observer,DisplayElement>

- (void)setWeatherData:(id<Subject>)weatherData;

@end
